package com.qianfeng.plateform2203.search.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "openapiindex",shards = 1,replicas = 1)
public class LoggerEsVO {
    @Id
    @Field(type = FieldType.Long)
    private Long id;

    @Field(type = FieldType.Keyword)
    private String app_key;
    @Field(type = FieldType.Keyword)
    private String apiName;
    @Field(type = FieldType.Keyword)
    private String remoteIp;
    @Field(type = FieldType.Keyword)
    private String serverIp;
    @Field(type = FieldType.Date)
    private Date reveivceTime;
    @Field(type = FieldType.Date)
    private Date responseTime;
    @Field(type = FieldType.Long)
    private long totalTime;
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String content;
}
